<?php

namespace App\Service\Admin;

use App\Model\Admin\PositionModel;
use App\Service\BaseService;

/**
 * 岗位管理-服务类
 * @author LZH
 * @since: 2021/08/12
 * Class PositionService
 */
class PositionService extends BaseService
{
    /**
     * 构造函数
     * LevelService constructor.
     */
    public function __construct()
    {
        $this->model = new PositionModel();
        parent::__construct();
    }

    /**
     * 获取数据列表
     * @return array
     * @since 2021/08/12
     * @author LZH
     */
    public function getList()
    {
        $param = $this->getRequestParam();

        // 查询条件
        $map = [];


        return parent::getList($map);
    }

    /**
     * 获取岗位列表
     * @return mixed
     * @author LZH
     */
    public function getPositionList()
    {
        $list = $this->model->where([
            'status' => 1,
            'mark' => 1
        ])->order("sort", "asc")
            ->all()
            ->toArray();
        return $list;
    }
}
